package com.errui.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author: Erruihhh
 * @Date: 2022/5/5
 * @Time: 19:13
 * @PROJECT_NAME: community
 * @Description:
 */
@Controller
public class ProfileController {

    @GetMapping("/profile/{action}")
    public String profile(@PathVariable(name = "action") String action, Model model) {
        if ("questions".equals(action)) {
            model.addAttribute("session", "questions");
            model.addAttribute("sectionName", "我的提问");
        }
        return "profile";
    }
}